package com.qf.mapper;

import com.qf.pojo.Books;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Select;
import org.omg.PortableServer.LIFESPAN_POLICY_ID;

import java.util.List;

public interface BooksMapper {
    @Select("select * from books")
    List<Books> findAll();
    @Insert("insert into books (bookname,categoryid,bookDescription,bookPicUrl,authorid) value(#{bookname},#{categoryid},#{bookdescription},#{bookpicurl},#{authorid})")
    void addBooks(Books books);



    @Select("select * from books where authorid=#{authorid} ")
    List<Books> AllBook(Long authorid);


}
